/**
 * Jaxson ajax
 *
 * Copyright Remedy Interactive, licensed under Apache version 2 license:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0.html
 *
 * This notice must remain in all java source files.
 */

package org.jaxson.struts.broadcast;


import org.jaxson.struts.reverseAjax.ReverseAjaxEvent;

/**
 * A message broadcast to all clients via reverse ajax.
 * 
 * @author Joe Maisel
 */
public class BroadcastMessage extends ReverseAjaxEvent
{
	public static final String EVENT_NAME = BroadcastMessage.class.getName();

	private String title;
	private String message;
	private String redirect;
	private boolean lock;

	public BroadcastMessage ()
	{
		super.setName( EVENT_NAME );
	}

	/**
	 * Locks the UI with an unclosable window.
	 * 
	 * @return the lock
	 */
	public boolean isLock()
	{
		return lock;
	}

	/**
	 * @param lock
	 *            the lock to set
	 */
	public void setLock( boolean lock )
	{
		this.lock = lock;
	}

	/**
	 * @return the message
	 */
	public String getMessage()
	{
		return message;
	}

	/**
	 * @param message
	 *            the message to set
	 */
	public void setMessage( String message )
	{
		this.message = message;
	}

	/**
	 * @return the title
	 */
	public String getTitle()
	{
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle( String title )
	{
		this.title = title;
	}

	/**
	 * @return the redirect
	 */
	public String getRedirect()
	{
		return redirect;
	}

	/**
	 * @param redirect
	 *            the redirect to set
	 */
	public void setRedirect( String redirect )
	{
		this.redirect = redirect;
	}

	private static final long serialVersionUID = 93847857389431L;
}
